package review;

public class Basic {
	private int x = 100;
	private String name = "zhangsan";
	// 匿名构造块
	{
		int y = 200;
		x = x * 200 + 1;
		name = name + x;
		System.out.println("X初始化完成");
	}
	public static String ppp;
	// 匿名静态块，只执行一次
	static {
		ppp = "" + Math.random() * 100000;
		System.out.println("ppp初始化完成：" + ppp);
	}

	public Basic() {
		System.out.println("This is basic的构造方法");
	}

	public static void main(String[] args) {
		Basic b = new Basic();
		System.out.println(b.x);
		System.out.println(b.name);
		Basic b2 = new Basic();
		System.out.println("B2.x=" + b2.x);
		//
		{
			int x = 100;
			System.out.println("x=" + x);
		}
		// System.out.println("x=" + x);
	}
}

class Ddd {

}

class F {

}